home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1997 July / macformat52.iso / mac / Shareware Plus / System components / Clicker 4.2 / For Programmers / Clicker Glue.h < prev    next >
Encoding:
Text File  |  1997-01-22  |  2.0 KB  |  60 lines

  1. /*
  2.         File:        Clicker Glue.h
  3.         
  4.         Contents:    Header file for Clicker glue code
  5.         
  6.         Copyright:    © by Manuel Kasper, Blue Ice Software.
  7.                     All rights reserved.
  8. */
  9.  
  10. /*
  11.     Note that the routines listed here should work with every version of Clicker, starting
  12.     with v4.0. If i make changes to the internal data structures, i'll make them in a way
  13.     that is compatible with existing programs using the glue.
  14. */
  15.  
  16. /* This enum's define the actions you can set on or off using SetActionBit() */
  17. enum {
  18.     mouseDownBit = 0,        /* Sound on Mouse Down */
  19.     mouseUpBit,                /* Sound on Mouse Up */
  20.     keyDownBit,                /* Sound on Key Down */
  21.     spaceBit,                /* Sound on Space */
  22.     returnBit,                /* Sound on Return */
  23.     tabBit,                    /* Sound on Tab */
  24.     deleteBit                /* Sound on Delete */
  25. };
  26.  
  27. /* This routine determines whether Clicker is installed. */
  28. Boolean ClickerIsInstalled(void);
  29.  
  30. /* Use this routine to determine whether Clicker is on or off. */
  31. Boolean ClickerOn(void);
  32.  
  33. /* Use this routine to set Clicker on or off */
  34. void SetClicker(Boolean ClickerOn);
  35.  
  36. /* Use this routine to set the action bits. */
  37. void SetActionBit(short theAction, Boolean SetOn);
  38.  
  39. /* Gives you the number of mouse clicks the user has done */
  40. long GetMouseClicks(void);
  41.  
  42. /* Gives you the number of key clicks the user has done */
  43. long GetKeyClicks(void);
  44.  
  45. /* Gives you the date/time of the last reset as seconds since midnight, 1/1/04. */
  46. unsigned long GetSince(void);
  47.  
  48. /* This routines gives you the name of the user (if registered), or "Not registered" otherwise. */
  49. void GetUserName(Str255 theName);
  50.  
  51. /* This routine tries to open the Clicker Control Panel by doing the following steps:
  52.  
  53.     1.    Locate the Control Panels Folder using FindFolder()
  54.     2.    Using PBGetCatInfo(), index through all files in the directory until it finds one with
  55.         type = 'CliX'.
  56.     3.    Find the Finder process (required, because it opens the CP)
  57.     4.    Set the selection to the Clicker Control Panel using the Alias and AE Manager,
  58.         then send an open selection event
  59. */
  60. void OpenControlPanel(void);